#include "qtechscheddatahelper.h"

QTECHSchedDataHelper::QTECHSchedDataHelper()
{

}

QList<SubjectModel> QTECHSchedDataHelper::getSubjects()
{
    QList<SubjectModel> lst;

    SubjectModel m;
    m.setCode("S001");
    m.setName("英语");
    m.setTecherCount(4);
    m.setIntro(QString("教材同步，英语考级，兴趣英语"));
    lst.append(m);

    SubjectModel m1;
    m1.setCode("S002");
    m1.setName("数学");
    m1.setTecherCount(3);
    m1.setIntro(QString("教材同步，奥数难点，趣味数学"));
    lst.append(m1);

    SubjectModel m2;
    m2.setCode("S003");
    m2.setName("语文");
    m2.setTecherCount(2);
    m2.setIntro(QString("教材难点，阅读理解，作文习作"));
    lst.append(m2);

    return lst;
}

QList<TecherModel> QTECHSchedDataHelper::getTeachers()
{
    QList<TecherModel> lst;

    QList<SubjectModel> sublst=getSubjects();
    QString subjcode1=sublst[1].getCode();

    TecherModel m1;
    m1.setCode(QUuid::createUuid().toString());
    m1.setName("闫老师");
    m1.setSex(1);
    m1.setBirth(QDateTime(QDate(1987,1,1),QTime(10,30,0)));
    m1.setOntime(QDateTime(QDate(2021,8,10),QTime(11,30,0)));
    m1.setSubjcode(subjcode1);
    lst.append(m1);

    TecherModel m2;
    m2.setCode(QUuid::createUuid().toString());
    m2.setName("胡老师");
    m2.setSex(1);
    m2.setBirth(QDateTime(QDate(1980,10,2),QTime(10,30,0)));
    m2.setOntime(QDateTime(QDate(2019,2,1),QTime(11,30,0)));
    m2.setSubjcode(sublst[0].getCode());
    lst.append(m2);

    TecherModel m3;
    m3.setCode(QUuid::createUuid().toString());
    m3.setName("董老师");
    m3.setSex(0);
    m3.setBirth(QDateTime(QDate(1970,10,2),QTime(10,30,0)));
    m3.setOntime(QDateTime(QDate(2020,12,1),QTime(11,30,0)));
    m3.setSubjcode(sublst[0].getCode());
    lst.append(m3);

    return lst;
}

QList<StudModel> QTECHSchedDataHelper::getStudents()
{
    QList<StudModel> lst;

    StudModel m1;
    m1.setCode("X001");
    m1.setName("刘小明");
    m1.setSex(0);
    m1.setEnrolDate(QDate(2019,9,1));
    m1.setEnrolTrainDate(QDate(2020,9,1));
    m1.setReptnum(0);
    lst.append(m1);

    StudModel m2;
    m2.setCode("X002");
    m2.setName("李春");
    m2.setSex(1);
    m2.setEnrolDate(QDate(2020,9,1));
    m2.setEnrolTrainDate(QDate(2022,3,1));
    m2.setReptnum(0);
    lst.append(m2);

    StudModel m3;
    m3.setCode("X003");
    m3.setName("胡大志");
    m3.setEnrolDate(QDate(2020,9,1));
    m3.setEnrolTrainDate(QDate(2020,10,1));
    m3.setReptnum(0);
    lst.append(m3);

    return lst;
}
